package com.edu.nf.implement;

import com.edu.nf.handle.RowProcessor;
import com.edu.nf.interfaces.ResultSetHandler;

import java.sql.ResultSet;
import java.sql.SQLException;

public class ArrayHandler implements ResultSetHandler<Object[]> {
    @Override
    public Object[] handle(ResultSet rs) throws SQLException {
        return rs.next() ? RowProcessor.toArray(rs):null;
    }
}
